Compiler Design


Q31.

Yacc stands for
GateOverflow

Q32.

The output of a lexical analyzer is
GateOverflow

Q33.

A symbol table of length 152 is processing 25 entries at any instant. What is occupation density?
GateOverflow

Q34.

Consider the following statements. I. Symbol table is accessed only during lexical analysis and syntax analysis. II. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment. III. Errors violating the condition 'any variable must be declared before its use' are detected during syntax analysis. Which of the above statements is/are TRUE?
GateOverflow

Q35.

The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?
GateOverflow

Q36.

The number of tokens in the following C code segment is switch(inputvalue) { case 1 : b =c*d; break; default : b =b++; break; }
GateOverflow

Q37.

A lexical analyzer uses the following patterns to recognize three tokens T_{1}, T_{2}, \; and \; T_{3} over the alphabet {a,b,c}. T_{1}:a?(b|c)^* a T_{2}:b?(a|c)^* b T_{3}:c?(b|a)^* c Note that 'x?' means 0 or 1 occurrence of the symbol x. Note also that the analyzer outputs the token that matches the longest possible prefix. If the string bbaacabc is processed by the analyzer, which one of the following is the sequence of tokens it outputs?
GateOverflow

Q38.

The number of tokens in the following C statement is printf("i=%d, &i=%x", i, &i);
GateOverflow

Q39.

In a two-pass assembler, resolution of subroutine calls and inclusion of labels in the symbol table is done during
GateOverflow

Q40.

In a compiler, keywords of a language are recognized during
GateOverflow